<template>
	<view class="page">
		<view class="my_padding">

			<view class="new_qd">
				<view class="nrew_qd_difx">
					<view class="nres_item">
						<view class="text">我的积分:{{my_jifen}}</view>
						<view class="btn" v-if="todaySign == 0" @click="signSuccess()">今日签到</view>
						<view class="btn " v-else-if="todaySign == 1">今日已签到</view>
					</view>
					<view class="nres_item">
						<view class="text">连续签到：{{qiandao_num}}天</view>
						<view class="btn" @click="signRegular">签到规则</view>
					</view>
				</view>
			</view>
			<view class="tday_qd">
				<view class="title">每日任务</view>
				<view class="cont_list">
					<view class="list">
						<view class="iconimg"> <img src="../../static/icon1.png" /> </view>
						<view class="text">
							<view>每日签到</view>
							<view>+{{getSignReward}}积分</view>
						</view>
						<view class="btn" @click="signSuccess()" v-if="todaySign == 0">待签到</view>
						<view class="btn" v-else-if="todaySign == 1">已签到</view>
					</view>

					<view class="list">
						<view class="iconimg"> <img src="../../static/icon2.png" /> </view>
						<view class="text">
							<view>每日推广充值会员</view>
							<view>+{{getRechargeReward}}积分</view>
						</view>
						<view class="btn" @click="navToUrl('/pages/user/recommend')" v-if="todayUsersRecharge == 0">待完成
						</view>
						<view class="btn" @click="receiveTask(1)" v-else-if="todayUsersRecharge == 1">待领取</view>
						<view class="btn" v-else>已领取</view>
					</view>


					<view class="list">
						<view class="iconimg"> <img src="../../static/icon3.png" /> </view>
						<view class="text">
							<view>每日完成一次签约</view>
							<view>+{{getRechargeReward}}积分</view>
						</view>
						<view class="btn" @click="navToUrl('/pages/user/recommend')" v-if="todayUsersRecharge == 0">待完成
						</view>
						<view class="btn" @click="receiveTask(1)" v-else-if="todayUsersRecharge == 1">待领取</view>
						<view class="btn" v-else>已领取</view>
					</view> 
				</view>
			</view>
			
			
			<view class="tday_qd">
				<view class="title">推荐任务</view>
				<view class="cont_list">
					<view class="list">
						<view class="iconimg ac"> <img src="../../static/icon4.png" /> </view>
						<view class="text">
							<view>连续签到7天额外赠送积分</view>
							<view>+12积分</view>
						</view>
						<view class="btn" @click="receiveRecTask(1)" v-if="newRecTaskStatus1 == 0">待完成</view>
						<view class="btn" v-else-if="newRecTaskStatus1 == 1">已领取</view>
					</view>
			
					<view class="list">
						<view class="iconimg ac"> <img src="../../static/icon5.png" /> </view>
						<view class="text">
							<view>连续签到15天额外赠送积分</view>
							<view>+26积分</view>
						</view>
						<view class="btn" @click="receiveRecTask(2)" v-if="newRecTaskStatus2 == 0">待完成</view>
						<view class="btn" v-else-if="newRecTaskStatus2 == 1">已领取</view>
					</view>
			 
				</view>
			</view>

			<!-- <view class="taskList">
				<view class="taskItem">
					<image class="icon" src="/static/images/icon-qiandao.png"></image>
					<view class="task_tit">每日签到</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+{{getSignReward}}积分</view>
					<view class="task_btn" @click="signSuccess()" v-if="todaySign == 0">待签到</view>
					<view class="task_btn_rev" >已签到</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task02.png"></image>
					<view class="task_tit">每日推广充值会员</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+{{getRechargeReward}}积分</view>
					<view class="task_btn" @click="navToUrl('/pages/user/recommend')" v-if="todayUsersRecharge == 0">待完成</view>
					<view class="task_btn" @click="receiveTask(1)" v-else-if="todayUsersRecharge == 1">待领取</view>
					<view class="task_btn_rev" v-else>已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task03.png"></image>
					<view class="task_tit">每日完成一次签约</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+{{getInvestReward}}积分</view>
					<view class="task_btn" @click="navToUrl('/pages/index/index')" v-if="today_invest == 0">待完成</view>
					<view class="task_btn" @click="receiveTask(2)" v-else-if="today_invest == 1">待领取</view>
					<view class="task_btn_rev" v-else>已领取</view>
				</view>
			</view> -->

			<!-- <image class="bartaskrecommend" src="/static/images/bar_recommend_task.png"></image> -->

			<!-- <view class="taskListRecommend">
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到7天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+12积分</view>
					<view class="task_btn" @click="receiveRecTask(1)" v-if="newRecTaskStatus1 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus1 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到15天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+26积分</view>
					<view class="task_btn" @click="receiveRecTask(2)" v-if="newRecTaskStatus2 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus2 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到30天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+50积分</view>
					<view class="task_btn" @click="receiveRecTask(3)" v-if="newRecTaskStatus3 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus3 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到75天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+120积分</view>
					<view class="task_btn" @click="receiveRecTask(4)" v-if="newRecTaskStatus4 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus4 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到100天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+160积分</view>
					<view class="task_btn" @click="receiveRecTask(5)" v-if="newRecTaskStatus5 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus5 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到150天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+220积分</view>
					<view class="task_btn" @click="receiveRecTask(6)" v-if="newRecTaskStatus6 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus6 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到200天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+300积分</view>
					<view class="task_btn" @click="receiveRecTask(7)" v-if="newRecTaskStatus7 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus7 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到250天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+400积分</view>
					<view class="task_btn" @click="receiveRecTask(8)" v-if="newRecTaskStatus8 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus8 == 1">已领取</view>
				</view>
				<view class="taskItem">
					<image class="icon" src="/static/images/icon_task01.png"></image>
					<view class="task_tit">连续签到300天额外赠送积分</view>
					<image class="coin" src="/static/images/icon-coin.png"></image>
					<view class="task_score">+500积分</view>
					<view class="task_btn" @click="receiveRecTask(9)" v-if="newRecTaskStatus9 == 0">待完成</view>
					<view class="task_btn_rev" v-else-if="newRecTaskStatus9 == 1">已领取</view>
				</view>
			</view> -->
		</view>

		<uni-popup ref="popupDialog" type="dialog">
			<uni-popup-dialog type="ok" title="签到规则" :content="message" :show-cancel-button="false"
				@confirm="dialogConfirm"></uni-popup-dialog>
		</uni-popup>
	</view>
</template>

<script>
	import tabBar from '@/components/tabBar/tabBar.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		components: {
			tabBar,
			uniPopupDialog
		},
		data() {
			return {
				user_bg: '',
				avatar: '/static/icon_avatar.png',
				userinfo: [],
				list: [],
				currentPage: '/pages/user/person',
				ifOnShow: false,
				unit: '',
				todaySign: 0,
				todayUsersRecharge: 0,
				today_invest: 0,
				qiandao_num: 0,
				my_jifen: 0,
				sign_task: 0,
				getSignReward: 0,
				getRechargeReward: 0,
				getInvestReward: 0,
				newTaskStatus1: 0,
				newTaskStatus2: 0,
				newTaskStatus3: 0,
				newRecTaskStatus1: 0,
				newRecTaskStatus2: 0,
				newRecTaskStatus3: 0,
				newRecTaskStatus4: 0,
				newRecTaskStatus5: 0,
				newRecTaskStatus6: 0,
				newRecTaskStatus7: 0,
				newRecTaskStatus8: 0,
				newRecTaskStatus9: 0,
				isDialogShow: false,
				message: "签到规则如下：\n1.每天签到一次，签到时间为当地时间的零点至次日零点之间。\n" +
					"\n2.连续签到奖励积分根据签到天数不同分为不同级别会员：\n连续签到7天和15天：初级智能以上可分别领取12和26积分。\n" +
					"连续签到30天和75天：基础智能以上可分别领取50和120积分。\n连续签到100天和150天：弱级智能以上可分别领取160积分和220积分。\n" +
					"连续签到200天和250天：中级智能以上可分别领取300积分和400积分。\n连续签到300天：强级智能以上可领取500积分。\n" +
					"\n3.如果中途断签，则需要重新累计签到天数，从零开始计算连续签到天数。\n",
			};
		},
		onNavigationBarButtonTap(val) {
			uni.navigateTo({
				url: '/pages/games/qiandao',
			});
		},
		onHide() {
			this.ifOnShow = true
		},
		onShow() {
			this.getTaskIndex();
			if (this.ifOnShow) {
				this.getData();
			}
			let pages = getCurrentPages();
			let currPage = pages[pages.length - 1];
			if (currPage.$vm.bank_id) {
				this.bank_id = currPage.$vm.bank_id;
				// this.loadData();
			}
		},
		onLoad: function(option) {
			// this.getData();
			//this.getTaskIndex();
		},
		onPullDownRefresh() {
			this.page = 1,
				this.lastPage = 0,
				this.todaySign = 0,
				this.newTaskStatus1 = 0,
				this.loadMoreText = "加载更多",
				this.showLoadMore = false;

			setTimeout(() => {
				this.getData();
			}, 300);
		},
		methods: {
			//user数据
			getData: function() {
				//获取基础参数
				// uni.showLoading({
				// 	title: "数据加载中",
				// 	mask: true
				// })
				var info = uni.getStorageSync("userinfo");
				if (info.token) {
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['username=' + info.username, 'token=' + info.token, 'timestamp=' +
						timestamp
					]);
					this.helper.req({
						api: "getTaskIndex",
						timestamp: timestamp,
						data: {
							username: info.username,
							token: info.token
						},
						header: {
							sign: sign
						},
						method: 'GET',
					}).then(res => {

						this.my_jifen = res.data.data.task.my_jifen;
						this.todaySign = res.data.data.task.qiandao_status;
						this.todayUsersRecharge = res.data.data.task.todayUsersRecharge;
						this.today_invest = res.data.data.task.today_invest;
						this.qiandao_num = res.data.data.task.qiandao_num;
						this.getSignReward = res.data.data.task.getSignReward;
						this.getRechargeReward = res.data.data.task.getRechargeReward;
						this.getInvestReward = res.data.data.task.getInvestReward;

						uni.stopPullDownRefresh();
						uni.hideLoading();

					})
				} else {
					uni.hideLoading();
				}
			},
			getTaskIndex: function() {
				//获取基础参数
				// uni.showLoading({
				// 	title:"数据加载中",
				// 	mask:true
				// })
				var info = uni.getStorageSync("userinfo");
				let timestamp = this.helper.now();
				let sign = this.helper.setSign(['token=' + info.token, 'timestamp=' + timestamp]);
				this.helper.req({
					api: "getTaskIndex",
					timestamp: timestamp,
					data: {
						token: info.token
					},
					header: {
						sign: sign
					},
					method: 'GET',
				}).then(res => {
					this.user = res.data.data.userinfo;
					this.my_jifen = res.data.data.task.my_jifen;
					this.todaySign = res.data.data.task.qiandao_status
					this.todayUsersRecharge = res.data.data.task.todayUsersRecharge
					this.today_invest = res.data.data.task.today_invest
					this.qiandao_num = res.data.data.task.qiandao_num
					this.sign_task = res.data.data.task.sign_task
					this.getSignReward = res.data.data.task.getSignReward;
					this.getRechargeReward = res.data.data.task.getRechargeReward;
					this.getInvestReward = res.data.data.task.getInvestReward;
					if (this.sign_task == 7) {
						this.newRecTaskStatus1 = 1
					} else if (this.sign_task == 15) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
					} else if (this.sign_task == 30) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
					} else if (this.sign_task == 75) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
					} else if (this.sign_task == 100) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
						this.newRecTaskStatus5 = 1
					} else if (this.sign_task == 150) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
						this.newRecTaskStatus5 = 1
						this.newRecTaskStatus6 = 1
					} else if (this.sign_task == 200) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
						this.newRecTaskStatus5 = 1
						this.newRecTaskStatus6 = 1
						this.newRecTaskStatus7 = 1
					} else if (this.sign_task == 250) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
						this.newRecTaskStatus5 = 1
						this.newRecTaskStatus6 = 1
						this.newRecTaskStatus7 = 1
						this.newRecTaskStatus8 = 1
					} else if (this.sign_task == 300) {
						this.newRecTaskStatus1 = 1
						this.newRecTaskStatus2 = 1
						this.newRecTaskStatus3 = 1
						this.newRecTaskStatus4 = 1
						this.newRecTaskStatus5 = 1
						this.newRecTaskStatus6 = 1
						this.newRecTaskStatus7 = 1
						this.newRecTaskStatus8 = 1
						this.newRecTaskStatus9 = 1
					}
					uni.hideLoading();
				})
			},
			// 簽到成功 
			signSuccess() {
				this.helper.checkLogin();
				var token = 'token';
				var info = uni.getStorageSync("userinfo");
				if (info.token) {
					token = info.token;
				}
				let timestamp = this.helper.now();
				let sign = this.helper.setSign(['token=' + token, 'timestamp=' + timestamp]);
				this.helper.req({
					api: "doQiandao",
					timestamp: timestamp,
					data: {
						token: token
					},
					header: {
						sign: sign
					},
					method: 'POST',
				}).then(res => {
					uni.showModal({
						title: "提示",
						content: res.data.message,
						showCancel: false,
						confirmText: "确定",
						success: function(res) {

						}
					})
					this.todaySign = 1
					uni.hideLoading();
				})
			},

			navToUrl: function(url) {
				return uni.navigateTo({
					url: url
				});
			},
			imageError: function(e) {
				this.avatar = '/static/icon_avatar.png';
			},
			CheckInToday: function() {
				console.log('进入CheckInToday')
				this.todaySign = 0
				uni.showToast({
					title: '签到成功，积分+1',
					//将值设置为 success 或者直接不用写icon这个参数
					icon: 'success',
					//显示持续时间为 1秒
					duration: 1000
				})
			},
			receiveTask: function(type) {
				if (type == 1) {
					this.helper.checkLogin();
					var token = 'token';
					var info = uni.getStorageSync("userinfo");
					if (info.token) {
						token = info.token;
					}
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['token=' + token, 'timestamp=' + timestamp]);
					this.helper.req({
						api: "doUsersRecharge",
						timestamp: timestamp,
						data: {
							token: token
						},
						header: {
							sign: sign
						},
						method: 'POST',
					}).then(res => {
						uni.showModal({
							title: "提示",
							content: res.data.message,
							showCancel: false,
							confirmText: "确定",
							success: function(res) {

							}
						})
						this.todayUsersRecharge = 2
						uni.hideLoading();
					})
				} else if (type == 2) {
					this.helper.checkLogin();
					var token = 'token';
					var info = uni.getStorageSync("userinfo");
					if (info.token) {
						token = info.token;
					}
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['token=' + token, 'timestamp=' + timestamp]);
					this.helper.req({
						api: "doTodayInvest",
						timestamp: timestamp,
						data: {
							token: token
						},
						header: {
							sign: sign
						},
						method: 'POST',
					}).then(res => {
						uni.showModal({
							title: "提示",
							content: res.data.message,
							showCancel: false,
							confirmText: "确定",
							success: function(res) {

							}
						})
						this.today_invest = 2
						uni.hideLoading();
					})

				} else if (type == 3) {
					this.helper.checkLogin();
					var token = 'token';
					var info = uni.getStorageSync("userinfo");
					if (info.token) {
						token = info.token;
					}
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['signnum=' + this.qiandao_num, 'token=' + token, 'timestamp=' +
						timestamp
					]);
					this.helper.req({
						api: "doSignIn",
						timestamp: timestamp,
						data: {
							signnum: this.qiandao_num,
							token: token
						},
						header: {
							sign: sign
						},
						method: 'POST',
					}).then(res => {
						uni.showModal({
							title: "提示",
							content: res.data.message,
							showCancel: false,
							confirmText: "确定",
							success: function(res) {

							}
						})
						this.newTaskStatus3 = 1
						uni.hideLoading();
					})


				}
				uni.showToast({
					title: '提交中',
					//将值设置为 success 或者直接不用写icon这个参数
					icon: 'success',
					//显示持续时间为 1秒
					duration: 1000
				})
			},
			receiveRecTask: function(type) {
				if (type == 1) {
					if (this.qiandao_num >= 7) {
						this.receiveTask(3)
						this.newRecTaskStatus1 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}

				} else if (type == 2) {
					if (this.qiandao_num >= 15) {
						this.receiveTask(3)
						this.newRecTaskStatus2 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 3) {
					if (this.qiandao_num >= 30) {
						this.receiveTask(3)
						this.newRecTaskStatus3 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 4) {
					if (this.qiandao_num >= 75) {
						this.receiveTask(3)
						this.newRecTaskStatus4 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 5) {
					if (this.qiandao_num >= 100) {
						this.receiveTask(3)
						this.newRecTaskStatus5 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 6) {
					if (this.qiandao_num >= 150) {
						this.receiveTask(3)
						this.newRecTaskStatus6 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 7) {
					if (this.qiandao_num >= 200) {
						this.receiveTask(3)
						this.newRecTaskStatus7 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 8) {
					if (this.qiandao_num >= 250) {
						this.receiveTask(3)
						this.newRecTaskStatus8 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				} else if (type == 9) {
					if (this.qiandao_num >= 300) {
						this.receiveTask(3)
						this.newRecTaskStatus9 = 1
					} else {
						uni.showToast({
							title: "未达到领取条件",
							icon: "error"
						})
					}
				}

			},
			signRegular: function() {
				this.toggleMessage()
			},
			toggleMessage() {
				this.$refs.popupDialog.open()
			},
			dialogConfirm(done) {
				done()
			}
		},
	};
</script>

<style lang="scss">
	page {
		font-size: 3.46667vw;
		min-width: 325px;
		color: #56595d;
		background-color: #ddeafd;
		padding-bottom: 16px;
	}

	.new_qd {
		width: 100%;
		height: 300rpx;
		background-image: url('');
		background-size: 100%;
		background-repeat: no-repeat;

		.nrew_qd_difx {
			padding: 70rpx 0 0 270rpx;
			display: flex;
			text-align: center;

			.nres_item {
				margin-right: 80rpx;

				.text {
					color: #353535;
				}

				.btn {
					font-size: 24rpx;
					background: #eaf0fd;
					border-radius: 30rpx;
					text-align: center;
					color: #4188ff;
					padding: 5rpx 10rpx;
					margin: 30rpx auto 0 auto;
				}
			}
		}
	}

	.tday_qd {
		margin: 0 29rpx 40rpx 29rpx;

		.title {
			background: linear-gradient(to top, #a0c3ff, #4f8efd);
			border-radius: 20rpx;
			height: 100rpx;
			line-height: 70rpx;
			text-align: center;
			color: #fff;
		}

		.cont_list {
			border-radius: 20rpx;
			background: #fff;
			padding: 20rpx;
			margin-top: -40rpx;

			.list {
				border-bottom: 1px solid #797979;
				display: flex;
				align-items: center;
				padding: 20rpx 0;
				position: relative;

				.iconimg {
					margin-left: 40rpx;
					width: 65rpx;
					height: 65rpx;

					img {
						width: 100%;
						height: 100%;
					}
				}
				.ac{
					width: 95rpx;
				}
				.text {
					margin-left: 40rpx;
					font-size:24rpx;
					view {
						margin-bottom: 5rpx;
					}
				}

				.btn {
					position: absolute;
					right: 0;
					top: 50%;
					width: 160rpx;
					height: 60rpx;
					background: linear-gradient(to top, #a0c3ff, #4f8efd);
					border: 2px solid #cce1ff;
					text-align: center;
					line-height: 55rpx;
					border-radius: 50rpx;
					color: #fff;
					margin-top: -30rpx;
				}
			}
			.list:last-child{
				border: 0;
			}
		}
	}

	.newuser_tit {
		width: 150px;
		height: 30px;
		position: absolute;
		top: 50px;
		left: 20px;
	}

	.newuser_icon {
		width: 150px;
		height: 110px;
		position: absolute;
		top: 40px;
		right: 20px;
		z-index: 2;
	}

	.newuser_contain {
		width: 90%;
		position: absolute;
		top: 2vh;
		left: 5%;
		height: 180px;
		background-color: #1C4971;
		border-radius: 8px;
		z-index: 1;
	}

	.top-info {
		width: 100%;
		position: absolute;
		top: 12vw;
	}

	.my_jifen,
	.my_qiandao {

		color: #fff;
		position: absolute;
		font-size: 16px;
		font-weight: bold;
	}

	/* 将 .my_jifen 定位在左侧 */
	.my_jifen {
		width: 50%;
		left: 4vw;
	}

	/* 将 .my_qiandao 定位在右侧 */
	.my_qiandao {
		width: 40%;
		right: 0;
	}

	.bartask {
		width: 50%;
		height: 30px;
		position: absolute;
		top: 30vh;
		left: 25%;
	}

	.bartaskrecommend {
		width: 50%;
		height: 30px;
		position: absolute;
		top: 70vh;
		left: 25%;
	}

	.sign_btn {
		position: absolute;
		bottom: 20px;
		left: 20%;
		line-height: 24px;
		padding: 4px 20px;
		background-color: #1C4971;
		background: #fea829;
		border-radius: 6px;
	}

	.sign_regular {
		position: absolute;
		bottom: 20px;
		right: 20%;
		line-height: 24px;
		padding: 4px 20px;
		color: #fff;
		background: #fea829;
		border-radius: 6px;
	}

	.signed_today {
		background: #ffc672;
		padding: 4px 14px;
		color: #fff;
	}

	.taskList {
		width: 90%;
		position: absolute;
		top: 35vh;
		left: 5%;
		padding: 10px 0;
	}

	.taskItem {
		width: 100%;
		height: 70px;
		padding: 10px;
		background-color: #1C4971;
		border-radius: 6px;
		margin-bottom: 10px;
		color: #fff;
		position: relative;
		box-shadow: 2px 2px 5px 3px #aaffff;
	}

	.task_tit {
		position: absolute;
		top: 14px;
		left: 70px;
		font-size: 14px;
		font-weight: 600;
	}

	.task_score {
		position: absolute;
		top: 36px;
		left: 86px;
		color: #fff;
	}

	.task_btn {
		position: absolute;
		top: 20px;
		right: 10px;
		padding: 6px 10px;
		color: #fff;
		background: #fea829;
		border-radius: 8px;
	}

	.task_btn_rev {
		position: absolute;
		top: 20px;
		right: 10px;
		padding: 6px 10px;
		color: #fff;
		background: #ffc672;
		border-radius: 8px;
	}

	.taskListRecommend {
		width: 90%;
		position: absolute;
		top: 75vh;
		left: 5%;
		padding: 10px 0;
	}

	.icon {
		position: absolute;
		top: 15px;
		left: 16px;
		width: 40px;
		height: 40px;
	}

	.coin {
		position: absolute;
		top: 36px;
		left: 68px;
		width: 16px;
		height: 16px;
	}
</style>
<!-- index -->
<style lang="scss" scoped>
	.tab-bar-footer {
		background-color: #fff;
		border-radius: 3.2vw;
		margin: 3.33333vw auto 0;
		margin-bottom: 60px;
		padding: 16px 0;
		width: 96.8vw;
		box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
	}

	.tab-bar {
		padding-bottom: 18px;
		background-color: #fff;
		border-radius: 3.2vw;
		margin: 3.33333vw auto 0;
		width: 96.8vw;
		box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);

	}
</style>
<!-- uni-grid -->
<style lang="scss" scoped>
	.image {
		width: 25px;
		height: 25px;
	}

	.text {
		margin-top: 10upx;
	}

	.example-body {
		/* #ifndef APP-NVUE */
		// display: block;
		/* #endif */
	}

	.swiper {
		height: 420px;
	}

	/* #ifdef H5 */
	@media screen and (min-width: 768px) and (max-width: 1425px) {
		.swiper {
			height: 630px;
		}
	}

	@media screen and (min-width: 1425px) {
		.swiper {
			height: 830px;
		}
	}

	/* #endif */
</style>